/*
 * @Description: 卡未开通模块
 * @Author: yingying.fan
 * @Date: 2019-03-29 10:30:24
 * @Last Modified by: yingying.fan
 * @Last Modified time: 2019-03-29 11:08:38
 */
<template>
  <div class="card-module-wrapper">
    <p class="card-not-open-hint">
      您还未开通{{cityName}}{{cardName}}
    </p>
    <div class="open-desc-wrapper">
      <div class="flex-h flex-vc open-desc-line">
        <span class="baseBgColorNoActive">1</span>
        <img
          src="../../assets/card_not_open_1.png"
          class="card-not-open-img"
        >
        <p class="flex1">
          开通{{cityName}}{{cardName}}<br>
          享受手机乘公交
        </p>
      </div>
      <div class="flex-h flex-vc open-desc-line">
        <span class="baseBgColorNoActive">2</span>
        <img
          src="../../assets/card_not_open_2.png"
          class="card-not-open-img"
        >
        <p class="flex1">
          自动生成二维码<br>
          扫码即可乘车
        </p>
      </div>
      <div class="flex-h flex-vc open-desc-line">
        <span class="baseBgColorNoActive">3</span>
        <div @click="goToDesc">
          点击查看
          <span class="baseColorNoAcitve">《{{cardName}}使用说明》</span>
        </div>
      </div>
    </div>
    <button
      class="baseBgColorWithActive card-module-big-button"
      @click="goToOpenPage"
    >立即开通</button>
  </div>
</template>

<script>
import BaseCardModule from './BaseCardModule'
import { open } from '../../../../utils/JumpUtils.js'
export default {
  name: 'CardNotOpenModule',
  extends: BaseCardModule,
  data() {
    return {
      cityName: window.cityname
    }
  },
  computed: {
    cardName() {
      return this.cardInfo.name
    }
  },
  methods: {
    goToDesc() {
      if (this.cardInfo.descGo) {
        // window.location.assign(this.cardInfo.descGo)
        open(this.cardInfo.descGo)
      }
    },
    goToOpenPage() {
      open('virtualcardapply.html?cardinstanceid=' + this.cardInfo.cardInstanceId)
      // open('cloudcardapply.html')
    }
  }
}
</script>

<style>
.card-not-open-hint {
  height: 50px;
  margin: 20px 0 10px 0;
  font-weight: bold;
  font-size: 36px; /*px*/
}
.open-desc-wrapper {
  height: 610px;
  padding: 0 40px;
}
.open-desc-line {
  font-size: 30px; /*px*/
  color: #666666;
  padding-top: 70px;
  text-align: left;
}
.open-desc-line > span {
  color: #ffffff;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  margin-right: 30px;
  text-align: center;
}
.card-not-open-img {
  width: 120px;
  height: 120px;
  margin: 0 18px 0 0;
}
.open-desc-line > div {
  font-size: 26px; /*px*/
}
</style>
